package com.chenl.provider.DEMOS.Quartz.dynamicQuartz.util;


import com.chenl.provider.DEMOS.Quartz.dynamicQuartz.po.SysJob;
import com.chenl.provider.DEMOS.Quartz.dynamicQuartz.zenum.JobEnum;
import org.quartz.Job;
import org.quartz.JobExecutionContext;

public class QuartzJob implements Job {

    @Override
    public void execute(JobExecutionContext context) {
        SysJob sysJob = (SysJob) context.getJobDetail().getJobDataMap().get(JobEnum.Key.getCode());
        QuartzUtil.runJob(sysJob.getInvokeTarget());
    }
}